<?php
include('../common/_const.php');
include('../common/common.php');
include('../common/checksession.php');
checksession("../index.php");
include('../../inc/conn.php');

$id		=$_GET['id'];

if(!islogintxt($id)){
	ShowMsg("管理员账号有误！","../moduls/member.php");	
	exit;
}

if($id=="admin"){
	ShowMsg("系统初始管理员无法删除！","../moduls/member.php");	
	exit;
}
$db=db_connect();
$sql="DELETE FROM `".PRETABLE."adminuser` WHERE `rootname`='".$id."'" ;

if($db->query($sql)){
	ShowMsg("操作成功！","../moduls/member.php");	
}else{
	ShowMsg("操作失败！","../moduls/member.php");	
}
$db->close();
?>